Clover coverage report - Enterprise Web Services - 1.0
Coverage timestamp: Mon May 30 2005 17:10:32 CEST
file stats: LOC: 106   Methods: 4
NCLOC: 57   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
GeronimoDDWriter.java 0% 0% 0% 0%
coverage
 1   
 /*
 2   
  * Copyright 2001-2004 The Apache Software Foundation.
 3   
  * 
 4   
  * Licensed under the Apache License, Version 2.0 (the "License");
 5   
  * you may not use this file except in compliance with the License.
 6   
  * You may obtain a copy of the License at
 7   
  * 
 8   
  *      http://www.apache.org/licenses/LICENSE-2.0
 9   
  * 
 10   
  * Unless required by applicable law or agreed to in writing, software
 11   
  * distributed under the License is distributed on an "AS IS" BASIS,
 12   
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13   
  * See the License for the specific language governing permissions and
 14   
  * limitations under the License.
 15   
  */
 16   
 
 17   
 package org.apache.geronimo.ews.ws4j2ee.toWs.dd.geronimo;
 18   
 
 19   
 import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext;
 20   
 import org.apache.geronimo.ews.ws4j2ee.toWs.AbstractWriter;
 21   
 import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationConstants;
 22   
 import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
 23   
 
 24   
 /**
 25   
  * @author hemapani
 26   
  */
 27   
 public class GeronimoDDWriter extends AbstractWriter {
 28  0
     public GeronimoDDWriter(J2EEWebServiceContext j2eewscontext) throws GenerationFault {
 29  0
         super(j2eewscontext, j2eewscontext.getMiscInfo().getOutPutPath() +
 30   
                 "/META-INF/" + GenerationConstants.GERONIMO_DD);
 31   
     }
 32   
 
 33  0
     public void writeCode() throws GenerationFault {
 34  0
         writeEJBDD();
 35   
     }
 36   
     
 37   
 //    <?xml version="1.0"?>
 38   
 //    <openejb-jar
 39   
 //        xmlns="http://www.openejb.org/xml/ns/openejb-jar"
 40   
 //        configId="your/domain/name/Example"
 41   
 //        parentId="org/apache/geronimo/Server">
 42   
 //
 43   
 //        <enterprise-beans>
 44   
 //            <session>
 45   
 //                <ejb-name>SimpleStatelessSession</ejb-name>
 46   
 //                <jndi-name>client/test/simple/SimpleStatelessSessionHome</jndi-name>
 47   
 //            </session>
 48   
 //        </enterprise-beans>
 49   
 //    </openejb-jar>
 50  0
     public void writeEJBDD() {
 51  0
         String ejbname = j2eewscontext.getWSDLContext().getTargetPortType().getName().toLowerCase();
 52  0
         int index = ejbname.lastIndexOf(".");
 53  0
         if (index > 0) {
 54  0
             ejbname = ejbname.substring(index + 1);
 55   
         }
 56  0
         out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
 57  0
         out.write("<openejb-jar\n");
 58  0
         out.write("    xmlns=\"http://www.openejb.org/xml/ns/openejb-jar\"\n");
 59  0
         out.write("    configId=\"j2ee/geronimo/ews/" + ejbname + "\"\n");
 60  0
         out.write("    parentId=\"org/apache/geronimo/Server\">\n");
 61  0
         out.write("    <enterprise-beans>\n");
 62  0
         out.write("        <session>\n");
 63  0
         out.write("            <ejb-name>" + ejbname + "</ejb-name>\n");
 64  0
         String implStyle = j2eewscontext.getMiscInfo().getImplStyle();
 65  0
         if (GenerationConstants.USE_LOCAL_AND_REMOTE.equals(implStyle)
 66   
                 || GenerationConstants.USE_REMOTE.equals(implStyle)) {
 67  0
             out.write("      <jndi-name>" + "ejb/" + ejbname + "</jndi-name>\n");
 68   
         }
 69  0
         if (GenerationConstants.USE_LOCAL_AND_REMOTE.equals(implStyle)
 70   
                 || GenerationConstants.USE_LOCAL.equals(implStyle)) {
 71  0
             out.write("      <local-jndi-name>" + "ejb/" + ejbname + "Local" + "</local-jndi-name>\n");
 72   
         }
 73  0
         out.write("         </session>\n");
 74  0
         out.write("     </enterprise-beans>\n");
 75  0
         out.write("</openejb-jar>\n");
 76  0
         out.flush();
 77   
     }
 78   
     
 79   
 
 80   
 //    <?xml version="1.0" encoding="UTF-8"?>
 81   
 //    <web-app
 82   
 //        xmlns="http://geronimo.apache.org/xml/ns/web/jetty"
 83   
 //        configId="your/domain/name/Example"
 84   
 //        parentId="org/apache/geronimo/Server"
 85   
 //        >
 86   
 //        <context-root>/debug-tool</context-root>
 87   
 //        <context-priority-classloader>false</context-priority-classloader>
 88   
 //    </web-app>
 89  0
     public void writeWebDD() {
 90  0
         String ejbname = j2eewscontext.getWSDLContext().getTargetPortType().getName().toLowerCase();
 91  0
         int index = ejbname.lastIndexOf(".");
 92  0
         if (index > 0) {
 93  0
             ejbname = ejbname.substring(index + 1);
 94   
         }
 95  0
         out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
 96  0
         out.write("<web-app\n");
 97  0
         out.write("    xmlns=\"http://www.openejb.org/xml/ns/openejb-jar\"\n");
 98  0
         out.write("    configId=\"j2ee/geronimo/ews/" + ejbname + "\"\n");
 99  0
         out.write("    parentId=\"org/apache/geronimo/Server\">\n");
 100  0
         out.write("    <context-root>/axis</context-root>");
 101  0
         out.write("    <context-priority-classloader>false</context-priority-classloader>");
 102  0
         out.write("</web-app>");
 103   
     }
 104   
 
 105   
 }
 106